﻿#ifndef REGISTERWIDGET_H
#define REGISTERWIDGET_H

#include <QDialog>
#include <QTimer>
#include "usernetworkaccessmanager.h"
#include "userservice.h"

namespace Ui {
class RegisterWidget;
}

class RegisterWidget : public QDialog
{
    Q_OBJECT

public:
    explicit RegisterWidget(QWidget *parent = nullptr);
    ~RegisterWidget();

    void showAndInit();

private slots:
    void on_receiveResCode(QString resCode);

    void on_pushButtonCancel_clicked();

    void on_pushButtonRegister_clicked();

    void on_pushButtonSendMessage_clicked();

private:
    Ui::RegisterWidget *ui;

    UserNetworkAccessManager *manager;
    UserService userService;
    QString resCode;
    QString username;
    QTimer *myTimer;
};

#endif // REGISTERWIDGET_H
